#include <cstdio>
#include <algorithm>
#include <string>
#include <iostream>
#include <stack>
using namespace std;
string s;
stack<char> fuhao;
stack<int> shuzi;
int main(void){
    while(getline(cin,s)){
        if(s[0]=='0' && s.size()==1){
            break;
        }
        int l=s.size();
        for(int i=0;i<l;i++){
            //printf("%d\n",i);
            if(s[i]==' '){
                continue;
            }
            if(s[i]=='+' || s[i]=='-' || s[i]=='*' || s[i]=='/'){
                fuhao.push(s[i]);
            }
            else{
                int num=0;
                while(i<l && s[i]!=' '){
                    num=num*10+s[i]-'0';
                    i++;
                }
                shuzi.push(num);
            }
        }
        double ans=0;
        while(!fuhao.empty()){
            //cout << fuhao.top() << endl;
            char f=fuhao.top();
            fuhao.pop();
            int a=shuzi.top();
            shuzi.pop();
            int b=shuzi.top();
            shuzi.pop();
            if(f=='+'){

            }
            else if(f=='-'){

            }
            else if(f=='*'){

            }
            else{
                ans=b*1.0/a;
                shuzi.push(ans);
            }
        }
        while(!shuzi.empty()){
            cout << shuzi.top() << endl;
            shuzi.pop();
        }
        cout << s << endl;
    }
    return 0;
}